package com.example.yoho.mvp.view.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.yoho.R;
import com.example.yoho.domain.Domain_Url;
import com.example.yoho.mvp.model.entity.BrandListEntity;
import com.example.yoho.mvp.model.entity.BrandTabEntity;
import com.example.yoho.utils.MyGlide;

import java.util.List;

public class MyTabsBrandAdapter extends BaseQuickAdapter<BrandTabEntity.ValuesBean, BaseViewHolder> {


    public MyTabsBrandAdapter(int layoutResId, @Nullable List<BrandTabEntity.ValuesBean> data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, BrandTabEntity.ValuesBean item) {
        ImageView imageView=helper.getView(R.id.brandgoods_image);
        TextView textView=helper.getView(R.id.brandgoods_tv);
        MyGlide.GlideFor(mContext, Domain_Url.IMAGE_URL+item.getCategory_img_path(),imageView);
        textView.setText(item.getCategory_name());
    }


}
